﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;

namespace Netcare.Web.Utils
{
    public class ReflectionUtil
    {
        public static string[] GetSpecificTypes(Assembly assembly, Type attribute)
        {
            List<String> list = new List<String>();
            foreach (var t in assembly.GetTypes())
            {
                if (t.GetCustomAttributes(attribute, false).Length == 1)
                    list.Add(t.FullName);
            }
            return list.ToArray();
        }
    }
}
